

import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;

public class LookinggoodsFrame extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					LookinggoodsFrame frame = new LookinggoodsFrame();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public LookinggoodsFrame() {
		//设置窗口标题
				setTitle("浏览商品");
				//设置窗体位置与大小
				setBounds(100, 100, 450, 300);
				//设置关闭操作的事件
				setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
				//固定大小
				setSize(600,500);
				//设置窗口的位置为居中显示
				setLocationRelativeTo(null);
				
				JMenuBar menuBar = new JMenuBar();
				setJMenuBar(menuBar);
				
				JMenu mnNewMenu = new JMenu("浏览商品"); 
				menuBar.add(mnNewMenu);

				JMenuItem mntmNewMenuItem = new JMenuItem("浏览商品");
				mnNewMenu.add(mntmNewMenuItem);
				mntmNewMenuItem.addActionListener(new ActionListener() {
					
					 @Override
						public void actionPerformed(ActionEvent e) {
						 com.neuedu.view.LookingviewFrame frame=new com.neuedu.view.LookingviewFrame();
							frame.setVisible(true);
					 }
				});
				
				
				JMenu mnNewMenu_1 = new JMenu("注册会员");
				menuBar.add(mnNewMenu_1);
				
				JMenuItem mntmNewMenuItem_1 = new JMenuItem("注册新会员");
				mnNewMenu_1.add(mntmNewMenuItem_1);
				
				mntmNewMenuItem_1.addActionListener(new ActionListener() {
					
					@Override
					public void actionPerformed(ActionEvent e) {
						// TODO Auto-generated method stub
					RegisterMenberFrame frame=new RegisterMenberFrame();
						frame.setVisible(true);
					}
				});
				
	}

}
